package com.only4play.practice.park.core.entity.order;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 业务订单
 * @author mengdy
 */
@Data
public class PkBizOrder {

    @ApiModelProperty(value = "订单id")
    private Long id;

    @ApiModelProperty(value = "订单来源：1:B端用户，2:C端用户")
    private Integer sourceType;

    @ApiModelProperty(value = "订单创建用户")
    private Long createUserId;

    @ApiModelProperty(value = "订单备注描述")
    private String remark;

    @ApiModelProperty(value = "订单状态：1待支付、2支付中、3支付成功、-1支付失败、-2取消、-3已全额退款、-4已部分退款")
    private Integer orderStatus;

    // 两个要哪个？还是说一个是业务订单状态一个是支付订单状态
    @ApiModelProperty(value = "订单支付状态：1待支付、2支付中、3支付成功、-1支付失败、-2取消、-3已全额退款、-4已部分退款")
    private Integer payStatus;

    @ApiModelProperty(value = "订单类型：2固定车辆购买、4固定车辆添加、6固定车辆续费、8固定车辆申请费、10临时停车费、" +
            "12优惠券信息服务费、14预约停车信息服务费、30代客泊车服务费、40商家钱包充值、41商家月结")
    private Integer orderType;

    @ApiModelProperty(value = "订单总金额")
    private Long totalAmount;

    @ApiModelProperty(value = "实际支付金额")
    private Long payAmount;

    @ApiModelProperty(value = "优惠金额")
    private Long discountAmount;

    @ApiModelProperty(value = "云停车订单号")
    private String orderNo;

    @ApiModelProperty(value = "支付唯一流水号")
    private String payOrderNo;

    @ApiModelProperty(value = "支付方式：1微信支付、2支付宝、3银联、4现金、51咔咖支付、60商家代付、70用户钱包支付")
    private Integer payMode;

    @ApiModelProperty(value = "订单创建日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "订单更新日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @ApiModelProperty(value = "订单支付时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date payTime;

}
